<!--_meta 作为公共模版分离出去-->
{include file="public/meta"}
<!--/meta 作为公共模版分离出去-->
<title>活动审核列表</title>
<style>
/*分页*/
.pagination {}
.pagination li {display: inline-block;margin-right: -1px;padding: 5px;border: 1px solid #e2e2e2;min-width: 20px;text-align: center;}
.pagination li.active {background: #009688;color: #fff;border: 1px solid #009688;}
.pagination li a {display: block;text-align: center;}
</style>
</head>
<body>
<!--_header 作为公共模版分离出去-->
{include file="public/header"}
<!--/_header 作为公共模版分离出去-->
<!--_menu 作为公共模版分离出去-->
{include file="public/menu"}
<!--/_menu 作为公共模版分离出去-->
<section class="Hui-article-box">
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 领队活动管理 <span class="c-gray en">&gt;</span> 活动已审核列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
	<div class="Hui-article">
		<article class="cl pd-20">
			
			<!-- <div class="cl pd-5 bg-1 bk-gray mt-20"></div> -->
			<div class="mt-20">
				<table class="table table-border table-bordered table-bg table-hover table-sort">
					<thead>
						<tr class="text-c">
							
							<th width="80">ID</th>
							<th width="100">活动名称</th>
							<th width="100">活动金额</th>
							<th width="100">所在城市</th>
							<th>活动详情地点</th>
							<th width="150">活动时间</th>
							<th width="150">报名截至时间</th>
							<th width="100">操作</th>
						</tr>
					</thead>
					<tbody>
					{foreach name="activity" item="val"}
						<tr class="text-c">
							<td>{$val.id}</td>
							<td>{$val.name}</td>
							<td>{$val.price}</td>
							<td>{$val.cityName}</td>
							<td>{$val.location}</td>
							<td>{$val.time_from}-{$val.time_to}</td>
							<td>{$val.upTo_time}</td>
							<!-- <td class="td-manage">
							{switch name="val.checkId"}
							{case value="1"}
							<a style="text-decoration:none" onClick="activity_start('下架状态','{$val.id}}','-1')"
                               href="javascript:;" class="btn btn-default size-S radius"
                               title="隐藏">禁用</a>
							{/case}
							{default /}
							<a style="text-decoration:none;color:#fff;background: #545151;border-color:#545151;"
                               onClick="activity_start('上架状态','{$val.id}','1')"
                               href="javascript:;" class="btn size-S radius"
                               title="显示">通过</a>
							{/switch}
							</td> -->
						</tr>
				     {/foreach}		
					</tbody>
				</table>
				       <div id="page">
                  			<div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-0">
                			<em class="layui-laypage-em"></em>
            				{$page}
                			</div>
        				</div>
			</div>
		</article>
	</div>
</section>
<!--_footer 作为公共模版分离出去-->
{include file="public/footer"}
<!--/_footer /作为公共模版分离出去-->
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
$('.table-sort').dataTable({
	"aaSorting": [[ 1, "desc" ]],//默认第几个排序
	"bStateSave": true,//状态保存
	"aoColumnDefs": [
	  //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
	  {"orderable":false,"aTargets":[0,8]}// 制定列不参与排序
	]
});
/*图片-添加*/
function picture_add(title,url){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
/*图片-查看*/
function picture_show(title,url,id){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
/*活动-删除*/
function activity_del(obj,adId){
			if(!confirm('确认要删除吗？')){
				return false;
			}
			$.ajax({
		        url: "{:url('activity/del_activity')}",
		        data:{'adid':adId},
		        type: "post",
		        dataType: "json",
		        success: function (res) {
		         if (res.state == 1) {
                        window.parent.layer.msg(res.msg, {icon: 1, time: 1000});
                        setTimeout(function () {
                            window.parent.location.reload();
                        }, 1200);
                    }else {
                        window.parent.layer.msg(res.msg, {icon: 1, time: 1000});
                        setTimeout(function () {
                            window.parent.location.reload();
                        }, 1200);
                    }
		        }
	    	});
		}
/*活动通过*/
    function activity_start(obj, aId,checkId) {
        layer.confirm('确认要通过吗?', function (index) {
            $.ajax({
                type: 'post',
                url: '{:url('activity/activity_start')}',
                data: {'aId':aId,'checkId':checkId},
                dataType: 'json',
                success: function (res) {
                  if (res.state == 1) {
                        window.parent.layer.msg(res.msg, {icon: 1, time: 1000});
                        setTimeout(function () {
                          window.parent.location.reload();
                        }, 1200);
                    } else {
                        window.parent.layer.msg(res.msg, {icon: 1, time: 1000});
                        setTimeout(function () {
                            window.parent.location.reload();
                        }, 1200);
                    }
                },
                error: function (data) {
                     layer.msg('网络错误，请关闭重试!', {icon: 2, time: 1000});
                    bt_sub.removeAttr('disabled');
                },
            });
        });
    }


</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>